import App from "./App";

// #ifndef VUE3
import Vue from "vue";
Vue.config.productionTip = false;
import store from "@/store";
import { tips } from "@/utils/tips";
import { toast } from "@/utils/toast";
import { loading } from "@/utils/loading";
import uView from "@/uni_modules/uview-ui";
import { dayjs } from "@/uni_modules/iRainna-dayjs/js_sdk/dayjs.min.js";
import { has } from "./directives/has";
Vue.prototype.dayjs = dayjs;
Vue.prototype.$toast = toast;
Vue.prototype.$tips = tips;
Vue.prototype.$has = has;
Vue.prototype.$loading = loading;
Vue.prototype.$store = store;

import MyComponents from "@/components/index.js";
Vue.use(MyComponents);

Vue.use(uView);
App.mpType = "app";
const app = new Vue({
  ...App,
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
export function createApp() {
  const app = createSSRApp(App);
  return {
    app,
  };
}
// #endif
